//============================================================================
// Name        : SerialPort.cpp
// Author      : Casey Kelso
// Copyright   : Kineticsproject.com (c) 2010
// Description : Linux Serial Port Module
// Created	   : September 14th 2010
//============================================================================

#ifndef SERIALPORT_H_
#define SERIALPORT_H_

#include "stdint.h"

class SerialPort {
public:
	SerialPort();
	virtual ~SerialPort();
	void Close(void);
	bool Open(const char* devNode);
	uint16_t Read(unsigned char* buffer, uint16_t size);
	uint16_t Write(const char* buffer, uint16_t size);
	bool Process(void);
	const int SERIAL_NO_DATA_PROCESSED;
	const uint16_t SERIAL_ERROR;



private:
	int	fileHandle;

};

#endif /* SERIALPORT_H_ */
